package com.zg.exception;

import lombok.Data;

@Data
public class BrokerException extends RuntimeException{
    private int code;
    private String message;

    public BrokerException(int code, String message){
        this.code = code;
        this.message = message;
    }

    public BrokerException(ResultCodeEnums resultCodeEnums){
        this.code = resultCodeEnums.getCode();
        this.message = resultCodeEnums.getMessage();
    }
}
